package com.doit.mr.day04.itera;

import java.util.ArrayList;
import java.util.List;

/**
 * @DATE 2021/12/8/21:58
 * @Author MDK
 * @Version 2021.2.2
 **/
public class TestMyIterator {
    public static void main(String[] args) {
        List<MyUser> list = new ArrayList<>();
        MyIterator myIterator = new MyIterator();
        while (myIterator.hasNext()){
            MyUser next = myIterator.next();
            list.add(next);
        }
        for (int i = 0; i < 3; i++) {
            System.out.println(list.get(i));
        }
    }
}
